# coding=utf-8
from random import random

import requests


class ApiTrigger(object):
    def __init__(self, url):
        self.url = url
        self.header = {
            'Connection': 'Keep-Alive',
            'Accept': 'text/html, application/xhtml+xml, */*',
            'Accept-Language': 'zh-CN,fr-FR;q=0.5',
            'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko',
        }

    def go(self):
        return requests.request('GET', self.url, timeout=10, headers=self.header)
